<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
<!-- <script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script> -->
<script src="./react.development.js"></script>
<script src="./react-dom.development.js"></script>
<script src="./babel.min.js"></script>
<script src="./prop-types.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
class TowWay extends React.Component{
  constructor(props){
    super(props);
    this.state = {
      msg:'iii'
    }
    this.handleChange = this.handleChange.bind(this)
  }
  handleChange(e){
    console.log(e.target.value)
    this.setState({
      msg:e.target.value
    })
  }
  render(){
    let {msg} = this.state;
    return (
      <div>
        <input type="text" value={msg} onChange={this.handleChange}/>
        <p>{msg}</p>
      </div>
    )
  }
}
ReactDOM.render(<TowWay />,document.getElementById('example'))
</script>
</body>
</html>